package com.ruoyi.web.controller.system;

import cn.dev33.satoken.stp.StpUtil;
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SysLogoutController {
    /**
     * 退出方法
     *
     * @return 结果
     */
    @PostMapping("/logout")
    public AjaxResult logout() {
        StpUtil.logout();
        return AjaxResult.success();
    }
}